const state = {
    operationButton: {
        insertx: null,
        updatex: null,
        deletex: null,
        importx: null,
        exportx: null,
    },
    buttonList:[],
}

const mutations = {
    insertButtonList : (state, insertData) => {
        state.buttonList = insertData;
    },
    INSERTCHANGE: (state, insertData) => {
        state.operationButton.insertx = insertData
    },
    UPDATECHANGE: (state, updateData) => {
        state.operationButton.updatex = updateData
    },
    DELETECHANGE: (state, deleteData) => {
        state.operationButton.deletex = deleteData
    },
    IMPORTCHANGE: (state, importData) => {
        state.operationButton.importx = importData
    },
    EXPORTCHANGE: (state, exportData) => {
        state.operationButton.exportx = exportData
    },
    FLUSHAALL: (state) => {
        state.operationButton.insertx = null;
        state.operationButton.updatex = null;
        state.operationButton.deletex = null;
        state.operationButton.importx = null;
        state.operationButton.exportx = null;
    },
    flushButtonList : (state) => {
        state.buttonList = [];
    }

}
const getters = {
    OPERATION: state => {
        return state.operationButton;
    },
    getButtonList : state => {
        return state.buttonList;
    },
   
}
const actions = {}

export default {
    namespaced: true,
    state,
    mutations,
    getters,
    actions
}